﻿using Cms.Core.Application.Service.UserInfo.Dto;
using Cms.Core.Validation.Abstractions;
using Cms.Core.Validation.IService;
using Cms.Core.Validation.Service;
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;

namespace Cms.Core.Validation.Validation
{
  public  class LoginDtoValidation : BaseAbstractValidator<LoginDto>
    {

        public LoginDtoValidation()
        {
            RuleFor(x => x.Name).NotEmpty().When(o=>o.Name!= null).WithMessage("登录名不能为空!!");
            RuleFor(x => x.Paw).NotEmpty().When(o => o.Paw != null).WithMessage("密码不能为空!!");
        }
    }
}
